<?php
//include("smtp.php");
//function sendsmtpmail($from_name,$from_email,$to_name,$to_email,$subject,$content)
//{
//   global $smtp;
//   global $smtpusermail;
//   $from = $from_name."<".$from_email.">";
//   $to   = $to_name."<".$to_email.">";
//	
//   $mailtype = "HTML";//?件格式（HTML/TXT）,TXT?文本?件
//   $smtp->debug = FALSE;//是否?示?送的??信息
//   $smtp->sendmail($to_email, $from, $subject, $content, $mailtype);
//}
require_once("phpmailer/class.phpmailer.php"); 
function sendsmtpmail($from_name,$from_email,$to_name,$to_email,$subject,$content)
{
	$mail = new PHPMailer(); 
	$mail->IsSMTP(); // send via SMTP 
	
	$mail->Host = "webmail.acuityworld.com"; // SMTP servers 
	$mail->Username = "info@acuityworld.com"; // SMTP username 注意：普通?件??不需要加 @域名	
	$mail->Password = "hw1234"; // SMTP password 	
//	$mail->From = "info@acuityworld.com"; //$from_email; // ?件人?箱
	$mail->From = "info@acuityworld.com"; //$from_email; // ?件人?箱		

	$mail->FromName = $from_name; // ?件人	
	$mail->SMTPAuth = true; // turn on SMTP authentication 	
	$mail->Port = 25; //default is 25, gmail is 465 or 587
	$mail->CharSet = "UTF-8"; // ?里指定字符集！	
	$mail->Encoding = "base64"; 
	$mail->AddAddress($to_email,$to_name); // 收件人?箱和姓名	
	$mail->AddReplyTo("leo.shen@imaker.com.cn","imaker.com"); 
	//$mail->WordWrap = 50; // set word wrap 	
	//$mail->AddAttachment("/var/tmp/file.tar.gz"); // attachment 	
	//$mail->AddAttachment("/tmp/image.jpg", "new.jpg"); 	
	$mail->IsHTML(true); // send as HTML 
	// ?件主?
	$mail->Subject = $subject;
	// ?件?容 	
	$mail->Body	= $content;
	if(!$mail->Send()) 
	{ 
	  echo "Send mail error<p>"; 
	  echo "Message: " . $mail->ErrorInfo; 
	  exit; 
	}
}
?>